package uk.ac.ebi.das.uniprot.image.util;

import uk.ac.ebi.das.uniprot.image.controller.AbstractPainter;
import uk.ac.ebi.das.uniprot.image.controller.CartoonPainter;

/**
 * Created by IntelliJ IDEA.
 * User: ljgarcia
 * Date: 01-Apr-2011
 * Time: 11:16:32
 * To change this template use File | Settings | File Templates.
 */
public enum FeatureTypeConfig {
    /*
    * TYPE(TYPE, name, category, color, type id, test accession, shape, position in the row, row, radius/height,
    * row for "centered" style, radius/height for "centered" Style, row for "rows" style, radius/height for "rows" Style)
    * Positive row: below the sequence line
    * Negative row: above the sequence line
    * up/middle/down with respect to the bottom line of the row
    * There is no row 0 (if used it will be automatically reassigned to -1)
    * */

    /**
     * ROWS Style (default)
     */
    //TYPE          TYPE             , name                          , category                              , color    , type id     , test    , shape                          , layer , pos non overlap            , row,  h, pos centered                 ,row, h , pos by row                 , row,                rad/height)
    //region
    DOMAIN         ("DOMAIN"         , "Domain"                      , FeatureCategory.REGION.getCategory()  , "#033158", "SO:0000417", "Q16832", FeatureShape.RECT.getShape()    , 2    , Position.UP.getPosition()  , -1 , 10, Position.MIDDLE.getPosition(), 0 ,   8, Position.UP.getPosition()  , -1 , CartoonPainter.RECTANGLE_HEIGHT, true),
    CA_BIND        ("CA_BIND"        , "Calcium binding"             , FeatureCategory.REGION.getCategory()  , "#005AE1", "SO:0000417", "P12814", FeatureShape.RECT.getShape()    , 2    , Position.UP.getPosition()  , -2 , 10, Position.MIDDLE.getPosition(), 0 ,  12, Position.UP.getPosition()  , -2 , CartoonPainter.RECTANGLE_HEIGHT, true),
    DNA_BIND       ("DNA_BIND"       , "DNA binding"                 , FeatureCategory.REGION.getCategory()  , "#58002F", "SO:0000417", "P16375", FeatureShape.RECT.getShape()    , 2    , Position.UP.getPosition()  , -3 , 10, Position.MIDDLE.getPosition(), 0 ,  16, Position.UP.getPosition()  , -3 , CartoonPainter.RECTANGLE_HEIGHT, true),
    NP_BIND        ("NP_BIND"        , "Nucleotide phosphate binding", FeatureCategory.REGION.getCategory()  , "#C40000", "SO:0000417", "Q197B6", FeatureShape.RECT.getShape()    , 2    , Position.UP.getPosition()  , -4 , 10, Position.MIDDLE.getPosition(), 0 ,  20, Position.UP.getPosition()  , -4 , CartoonPainter.RECTANGLE_HEIGHT, true),
	INTRAMEM       ("INTRAMEM"       , "Intramembrane"               , FeatureCategory.REGION.getCategory()  , "#00CED1", "SO:0001075", "P0AER0", FeatureShape.RECT.getShape()    , 1    , Position.UP.getPosition()  , -5 , 10, Position.MIDDLE.getPosition(), 0 ,  24, Position.UP.getPosition()  , -5 , CartoonPainter.RECTANGLE_HEIGHT, true),
	TOPO_DOM       ("TOPO_DOM"       , "Topological domain"          , FeatureCategory.REGION.getCategory()  , "#FBA7BC", "SO:0001072", "P30504", FeatureShape.RECT.getShape()    , 1    , Position.UP.getPosition()  , -6 , 10, Position.MIDDLE.getPosition(), 0 ,  28, Position.UP.getPosition()  , -6 , CartoonPainter.RECTANGLE_HEIGHT, true),
    TRANSMEM       ("TRANSMEM"       , "Transmembrane"               , FeatureCategory.REGION.getCategory()  , "#00CC00", "SO:0001077", "P13761", FeatureShape.RECT.getShape()    , 1    , Position.UP.getPosition()  , -7 , 10, Position.MIDDLE.getPosition(), 0 ,  32, Position.UP.getPosition()  , -7 , CartoonPainter.RECTANGLE_HEIGHT, true),
    ZN_FING        ("ZN_FING"        , "Zinc finger binding"         , FeatureCategory.REGION.getCategory()  , "#CC00CC", "SO:0000417", "O55718", FeatureShape.RECT.getShape()    , 2    , Position.UP.getPosition()  , -8 , 10, Position.MIDDLE.getPosition(), 0 ,  36, Position.UP.getPosition()  , -8 , CartoonPainter.RECTANGLE_HEIGHT, true),
    //not initial subset
    COILED         ("COILED"         , "Coiled coil"                 , FeatureCategory.REGION.getCategory()  , "#990033", "SO:0001080", "Q91G88", FeatureShape.RECT.getShape()    , 1    , Position.UP.getPosition()  , -9 , 10, Position.MIDDLE.getPosition(), 0 ,  40, Position.UP.getPosition()  , -9 , CartoonPainter.RECTANGLE_HEIGHT, false),
    COMPBIAS       ("COMPBIAS"       , "Compositional bias"          , FeatureCategory.REGION.getCategory()  , "#FFD399", "SO:0001066", "Q6GZX4", FeatureShape.RECT.getShape()    , 1    , Position.UP.getPosition()  , -10, 10, Position.MIDDLE.getPosition(), 0 ,  44, Position.UP.getPosition()  , -10, CartoonPainter.RECTANGLE_HEIGHT, false),
    CONSERVED_MOTIF("CONSERVED_MOTIF", "Conserved motif"             , FeatureCategory.REGION.getCategory()  , "#35BD95", "SO:0100017", "Q6GZW6", FeatureShape.RECT.getShape()    , 1    , Position.UP.getPosition()  , -11, 10, Position.MIDDLE.getPosition(), 0 ,  48, Position.UP.getPosition()  , -11, CartoonPainter.RECTANGLE_HEIGHT, false),
    REGION         ("REGION"         , "Region"                      , FeatureCategory.REGION.getCategory()  , "#AF480F", "SO:0000001", "P13813", FeatureShape.RECT.getShape()    , 1    , Position.UP.getPosition()  , -12, 10, Position.MIDDLE.getPosition(), 0 ,  52, Position.UP.getPosition()  , -12, CartoonPainter.RECTANGLE_HEIGHT, false),
    REPEAT         ("REPEAT"         , "Repeat"                      , FeatureCategory.REGION.getCategory()  , "#0C4119", "SO:0001068", "P18560", FeatureShape.RECT.getShape()    , 1    , Position.UP.getPosition()  , -13, 10, Position.MIDDLE.getPosition(), 0 ,  56, Position.UP.getPosition()  , -13, CartoonPainter.RECTANGLE_HEIGHT, false),

    //molecule processing
    PEPTIDE        ("PEPTIDE"        , "Peptide"                     , FeatureCategory.MOLECULE.getCategory(), "#7DBAA4", "SO:0001064", "Q9Y5Q6", FeatureShape.RECT.getShape()    , 1    , Position.DOWN.getPosition(), 1  , 10, Position.MIDDLE.getPosition(), 0 ,  60, Position.DOWN.getPosition(), 1  , CartoonPainter.RECTANGLE_HEIGHT, true),
	PROPEP         ("PROPEP"         , "Propeptide"                  , FeatureCategory.MOLECULE.getCategory(), "#9B7057", "SO:0001062", "Q8LAX3", FeatureShape.RECT.getShape()    , 1    , Position.DOWN.getPosition(), 2  , 10, Position.MIDDLE.getPosition(), 0 ,  64, Position.DOWN.getPosition(), 2  , CartoonPainter.RECTANGLE_HEIGHT, true),
	SIGNAL         ("SIGNAL"         , "Signal"                      , FeatureCategory.MOLECULE.getCategory(), "#CDBCF6", "SO:0000418", "P43307", FeatureShape.RECT.getShape()    , 1    , Position.DOWN.getPosition(), 3  , 10, Position.MIDDLE.getPosition(), 0 ,  68, Position.DOWN.getPosition(), 3  , CartoonPainter.RECTANGLE_HEIGHT, true),
	TRANSIT        ("TRANSIT"        , "Transit"                     , FeatureCategory.MOLECULE.getCategory(), "#F5B800", "SO:0000725", "Q02776", FeatureShape.RECT.getShape()    , 1    , Position.DOWN.getPosition(), 4  , 10, Position.MIDDLE.getPosition(), 0 ,  72, Position.DOWN.getPosition(), 4  , CartoonPainter.RECTANGLE_HEIGHT, true),
    //not initial subset
    CHAIN          ("CHAIN"          , "Chain"                       , FeatureCategory.MOLECULE.getCategory(), "#BE6400", "SO:0000419", "Q6GZX4", FeatureShape.RECT.getShape()    , 3    , Position.DOWN.getPosition(), 5  , 10, Position.MIDDLE.getPosition(), 0 ,  76, Position.DOWN.getPosition(), 5  , CartoonPainter.RECTANGLE_HEIGHT, false),
    INIT_MET       ("INIT_MET"       , "Initiator methionine"        , FeatureCategory.MOLECULE.getCategory(), "#0000CC", "SO:0000691", "Q6GZS3", FeatureShape.RECT.getShape()    , 3    , Position.DOWN.getPosition(), 6  , 10, Position.MIDDLE.getPosition(), 0 ,  80, Position.DOWN.getPosition(), 6  , CartoonPainter.RECTANGLE_HEIGHT, false),

	//aa sites
	ACT_SITE       ("ACT_SITE"       , "Active site"                 , FeatureCategory.SITE.getCategory()    , "#760000", "SO:0001104", "Q9H0P0", FeatureShape.DIAMOND.getShape() , 3    , Position.UP.getPosition()  , -14, 5 , Position.UP.getPosition()    , -4,  84, Position.UP.getPosition()  , -14, 5, true),
	METAL          ("METAL"          , "Metal binding"               , FeatureCategory.SITE.getCategory()    , "#FF6666", "SO:0001092", "P02787", FeatureShape.CIRCLE.getShape()  , 3    , Position.UP.getPosition()  , -15, 5 , Position.UP.getPosition()    , -5,  88, Position.UP.getPosition()  , -15, 5, true),
    //not initial subset
    BINDING        ("BINDING"        , "Binding"                     , FeatureCategory.SITE.getCategory()    , "#584858", "SO:0001091", "Q6GZV6", FeatureShape.RECT.getShape()    , 3    , Position.UP.getPosition()  , -16,10 , Position.MIDDLE.getPosition(),  0,  92, Position.UP.getPosition()  , -16, CartoonPainter.RECTANGLE_HEIGHT, false),
    SITE           ("SITE"           , "Site"                        , FeatureCategory.SITE.getCategory()    , "#005858", "SO:0000839", "P68250", FeatureShape.RECT.getShape()    , 3    , Position.UP.getPosition()  , -17,10 , Position.MIDDLE.getPosition(),  0,  96, Position.UP.getPosition()  , -17, CartoonPainter.RECTANGLE_HEIGHT, false),

    //aa modifications
	CARBOHYD       ("CARBOHYD"       , "Glycosylation"               , FeatureCategory.AAMOD.getCategory()   , "#25C54C", "MOD:00693" , "Q15293", FeatureShape.HEXAGON.getShape() , 3    , Position.DOWN.getPosition(),  7 , 7 , Position.DOWN.getPosition()   , 4 ,100, Position.DOWN.getPosition(), 7  , 7, true),
	LIPID          ("LIPID"          , "Lipidation"                  , FeatureCategory.AAMOD.getCategory()   , "#8E6B23", "MOD:01155" , "O75716", FeatureShape.WAVE.getShape()    , 3    , Position.DOWN.getPosition(),  8 , 5 , Position.DOWN.getPosition()   , 5 ,104, Position.DOWN.getPosition(), 8  , 5, true),
	MOD_RES        ("MOD_RES"        , "Modified residue"            , FeatureCategory.AAMOD.getCategory()   , "#50A9A5", "SO:0001089", "P30443", FeatureShape.TRIANGLE.getShape(), 3    , Position.DOWN.getPosition(),  9 , 10, Position.DOWN.getPosition()   , 6 ,108, Position.DOWN.getPosition(), 9  , 10, true),
    //not initial subset NON_STD DISULFID CROSSLINK
    NON_STD        ("NON_STD"        , "Non-standard aa"             , FeatureCategory.AAMOD.getCategory()   , "#DC410F", "MOD:00868" , "Q8NHP1", FeatureShape.RECT.getShape()    , 3    , Position.DOWN.getPosition(),  10, 10, Position.MIDDLE.getPosition() , 0 ,112, Position.DOWN.getPosition(), 10 , CartoonPainter.RECTANGLE_HEIGHT, false),
    DISULFID       ("DISULFID"       , "Disulfide bond"              , FeatureCategory.AAMOD.getCategory()   , "#85A01E", "MOD:00689" , "Q6GZN7", FeatureShape.RECT.getShape()    , 3    , Position.DOWN.getPosition(),  11, 10, Position.MIDDLE.getPosition() , 0 ,116, Position.DOWN.getPosition(), 11 , CartoonPainter.RECTANGLE_HEIGHT, false),
    CROSSLINK      ("CROSSLINK"      , "Cross-link"                  , FeatureCategory.AAMOD.getCategory()   , "#693C3C", "MOD:00033" , "P04229", FeatureShape.RECT.getShape()    , 3    , Position.DOWN.getPosition(),  12, 10, Position.MIDDLE.getPosition() , 0 ,120, Position.DOWN.getPosition(), 12 , CartoonPainter.RECTANGLE_HEIGHT, false),

    //natural variations (not initial subset)
    VAR_SEQ        ("VAR_SEQ"        , "Alternative sequence"        , FeatureCategory.NATVAR.getCategory()  , "#BB4FBB", "SO:0001149" , "P31946", FeatureShape.RECT.getShape()    , 3    , Position.DOWN.getPosition(),  13, 10, Position.MIDDLE.getPosition() , 0 ,124, Position.DOWN.getPosition(), 13 , CartoonPainter.RECTANGLE_HEIGHT, false),
    VARIANT        ("VARIANT"        , "Natural variant"             , FeatureCategory.NATVAR.getCategory()  , "#A0005A", "SO:0001147" , "P48347", FeatureShape.RECT.getShape()    , 3    , Position.DOWN.getPosition(),  14, 10, Position.MIDDLE.getPosition() , 0 ,128, Position.DOWN.getPosition(), 14 , CartoonPainter.RECTANGLE_HEIGHT, false),

    //experimental info (not initial subset)
    MUTAGEN        ("MUTAGEN"        , "Mutagenesis"                 , FeatureCategory.EXPINF.getCategory()  , "#CC8D98", "SO:0001148" , "P92177", FeatureShape.RECT.getShape()    , 3    , Position.DOWN.getPosition(),  15, 10, Position.MIDDLE.getPosition() , 0 ,132, Position.DOWN.getPosition(), 15 , CartoonPainter.RECTANGLE_HEIGHT, false),
    UNSURE         ("UNSURE"         , "Sequence uncertainty"        , FeatureCategory.EXPINF.getCategory()  , "#3232C8", "SO:0001086" , "P33405", FeatureShape.RECT.getShape()    , 3    , Position.DOWN.getPosition(),  16, 10, Position.MIDDLE.getPosition() , 0 ,136, Position.DOWN.getPosition(), 16 , CartoonPainter.RECTANGLE_HEIGHT, false),
    CONFLICT       ("CONFLICT"       , "Sequence conflict"           , FeatureCategory.EXPINF.getCategory()  , "#1A1A1A", "SO:0001085" , "P13744", FeatureShape.RECT.getShape()    , 3    , Position.DOWN.getPosition(),  17, 10, Position.MIDDLE.getPosition() , 0 ,140, Position.DOWN.getPosition(), 17 , CartoonPainter.RECTANGLE_HEIGHT, false),
    NON_CONS       ("NON_CONS"       , "Non-adjacent residues"       , FeatureCategory.EXPINF.getCategory()  , "#AF326E", "SO:0001083" , "P85938", FeatureShape.RECT.getShape()    , 3    , Position.DOWN.getPosition(),  18, 10, Position.MIDDLE.getPosition() , 0 ,144, Position.DOWN.getPosition(), 18 , CartoonPainter.RECTANGLE_HEIGHT, false),
    NON_TER        ("NON_TER"        , "Non-terminal residue"        , FeatureCategory.EXPINF.getCategory()  , "#000058", "SO:0001084" , "P13813", FeatureShape.RECT.getShape()    , 3    , Position.DOWN.getPosition(),  19, 10, Position.MIDDLE.getPosition() , 0 ,148, Position.DOWN.getPosition(), 19 , CartoonPainter.RECTANGLE_HEIGHT, false),

    //secondary structure (not initial subset)  HELIX     TURN        STRAND
    HELIX          ("HELIX"          , "Alpha helix"                 , FeatureCategory.SECSTR.getCategory()  , "#005800", "SO:0001117" , "Q8GBW6", FeatureShape.RECT.getShape()    ,  4   , Position.UP.getPosition()  , -18, 10, Position.MIDDLE.getPosition() , 0 ,152, Position.UP.getPosition()  , -18, CartoonPainter.RECTANGLE_HEIGHT, false),
    TURN           ("TURN"           , "Turn"                        , FeatureCategory.SECSTR.getCategory()  , "#5E00BB", "SO:0001128" , "P93343", FeatureShape.RECT.getShape()    ,  4   , Position.UP.getPosition()  , -19, 10, Position.MIDDLE.getPosition() , 0 ,156, Position.UP.getPosition()  , -19, CartoonPainter.RECTANGLE_HEIGHT, false),
    STRAND         ("STRAND"         , "Beta Strand"                 , FeatureCategory.SECSTR.getCategory()  , "#FF82B4", "SO:0001111" , "P30443", FeatureShape.RECT.getShape()    ,  4   , Position.UP.getPosition()  , -20, 10, Position.MIDDLE.getPosition() , 0 ,160, Position.UP.getPosition()  , -20, CartoonPainter.RECTANGLE_HEIGHT, false),


    //unknown
    UNKNOWN        ("UNKNOWN"        , "Unknown"                     , FeatureCategory.UNKNOWN.getCategory() , "#666666", "unknown"   , ""      , ""                              , 0    , ""                         , 0  ,  0, ""                            , 0 , 0 ,                         "", 0  , 0, false);

    /**
     * CENTERED Style
     */
//    //region
//    DOMAIN("DOMAIN", "Domain", "region", "#033158", "SO:0000417", "Q16832", FeatureShape.RECT.getShape(), "middle", 0, 8),
//    CA_BIND("CA_BIND", "Calcium binding", "region", "#005AE1", "SO:0000417", "P12814", FeatureShape.RECT.getShape(), "middle", 0, 12),
//    DNA_BIND("DNA_BIND", "DNA binding", "region", "#58002F", "SO:0000417", "P16375", FeatureShape.RECT.getShape(), "middle", 0, 16),
//    NP_BIND("NP_BIND", "Nucleotid phosphate binding", "region", "#C40000", "SO:0000417", "Q197B6", FeatureShape.RECT.getShape(), "middle", 0, 20),
//	  INTRAMEM("INTRAMEM", "Intramembrane", "region", "#00CED1", "SO:0001075", "P0AER0", FeatureShape.RECT.getShape(), "middle", 0, 24),
//	  TOPO_DOM("TOPO_DOM", "Topological domain", "region", "#E2546A", "SO:0001072", "P30504", FeatureShape.RECT.getShape(), "middle", 0, 28),
//    TRANSMEM("TRANSMEM", "Transmenbrane", "region", "#37279A", "SO:0001077", "P13761", FeatureShape.RECT.getShape(), "middle", 0, 32),
//    ZN_FING("ZN_FING", "Zinc finger binding", "region", "#CC00CC", "SO:0000417", "O55718", FeatureShape.RECT.getShape(), "middle", 0, 36),
//    //molecule
//    PEPTIDE("PEPTIDE", "Peptide", "molecule", "#427E64", "SO:0001064", "Q9Y5Q6", FeatureShape.RECT.getShape(), "middle", 0, 40),
//	  PROPEP("PROPEP", "Propeptide", "molecule", "#9B7057", "SO:0001062", "Q8LAX3", FeatureShape.RECT.getShape(), "middle", 0, 44),
//	  SIGNAL("SIGNAL", "Signal", "molecule", "#AA8CF0", "SO:0000418", "P43307", FeatureShape.RECT.getShape(), "middle", 0, 48),
//	  TRANSIT("TRANSIT", "Transit", "molecule", "#FF8000", "SO:0000725", "Q02776", FeatureShape.RECT.getShape(), "middle", 0, 52),
//	  //aa sites
//	  ACT_SITE("ACT_SITE", "Active site", "site", "#760000", "SO:0001104", "Q9H0P0", "diamond", "up", -4, 7),
//	  METAL("METAL", "Metal binding", "site", "#FF6666", "SO:0001092", "P02787", "circle", "up", -5, 7),
//    //aa modifications
//	  CARBOHYD("CARBOHYD", "Glycosilation", "aaMod", "#25C54C", "MOD:00693", "Q15293", "hexagon", "down", 4, 7),
//	  LIPID("LIPID", "Lipidation", "aaMod", "#8E6B23", "MOD:01155", "O75716", "wave", "down", 5, 5),
//	  MOD_RES("MOD_RES", "Modified residue", "aaMod", "#50A9A5", "SO:0001089", "P30443", "triangle", "down", 6, 10),
//    //unknown
//    UNKNOWN("UNKNOWN", "Unknown", "unknown", "#666666", "unknown", "", "", "", 0, 0);

    private String type;
    private String name;
    private String category;
    private String color;
    private String cvId;
    private String test;
    private String shape;
    private int nonOverlappingLayer;
    private String position;
    private int row;
    private int radius;
    private String positionCentered;
    private int rowCentered;
    private int radiusCentered;
    private String positionRows;
    private int rowRows;
    private int radiusRows;
    private boolean display;

    FeatureTypeConfig(String type, String name, String category, String color, String cvId, String test, String shape
        , int nonOverlappingLayer, String position, int row, int radius
        , String positionCentered, int rowCentered, int radiusCentered
        , String positionRows, int rowRows, int radiusRows, boolean display){
        this.type = type;
        this.name = name;
        this.category = category;
        this.color = color;
        this.cvId = cvId;
        this.test = test;
        this.shape = shape;
        this.nonOverlappingLayer = nonOverlappingLayer;
        this.position = position;
        this.row = row;
        this.radius = radius;
        this.positionCentered = positionCentered;
        this.rowCentered = rowCentered;
        this.radiusCentered = radiusCentered;
        this.positionRows = positionRows;
        this.rowRows = rowRows;
        this.radiusRows = radiusRows;
        this.display = display;
    }

    public String getType() {
        return type;
    }

    public String getName() {
        if (FeatureTypeConfigHelper.featureNameMap.get(this.getType()) != null) {
            return FeatureTypeConfigHelper.featureNameMap.get(this.getType());
        }
        return name;
    }

    public String getCategory() {
        return category;
    }

    public String getColor() {
        return color;
    }

    public String getCvId() {
        return cvId;
    }

    public String getTest() {
        return test;
    }

    public String getPosition() {
        return position;
    }

    public String getShape() {
        if (AbstractPainter.ALL_RECTANGLE) {
            return FeatureShape.RECT.getShape();
        }
        return shape;
    }

    public int getNonOverlappingLayer() {
        return nonOverlappingLayer;
    }

    public int getRow() {
        return row;
    }

    public int getRadius() {
        return radius;
    }

    public int getRowCentered() {
        return rowCentered;
    }

    public int getRadiusCentered() {
        return radiusCentered;
    }

    public int getRowRows() {
        return rowRows;
    }

    public int getRadiusRows() {
        return radiusRows;
    }

    public String getPositionCentered() {
        return positionCentered;
    }

    public String getPositionRows() {
        return positionRows;
    }

    public String getPositionNonOverlapping() {
        return Position.UP.getPosition();
    }

    public int getRadiusNonOverlapping() {
        return this.getRadiusRows();
    }

    public boolean getDisplay() {
        return this.display;
    }

    void setDisplay(boolean display) {
        this.display = display;
    }

    public void setRowRows(int rowRows) {
        this.rowRows = rowRows;
    }

    public void setRowCentered(int rowCentered) {
        this.rowCentered = rowCentered;
    }

    public void setRadiusCentered(int radiusCentered) {
        this.radiusCentered = radiusCentered;
    }

    /**
     * Modifies the position, row, and radius for this object.
     * @param position
     * @param row
     * @param radius
     */
    private void setStyle(String position, int row, int radius) {
        this.position = position;
        this.row = row;
        this.radius = radius;
    }

    /**
     * Sets the centered style meaning position, row, and radius when the corresponding shape is centered.
     */
    public void setCenteredStyle() {
        if (AbstractPainter.ALL_RECTANGLE) { //no different shapes, just rectangles: radius centered has the centered height
            this.setStyle(Position.MIDDLE.getPosition(), 0, this.getRadiusCentered());
        } else { //shapes and rectangles
            if (this.getShape().equals(FeatureShape.RECT.getShape())) { //rectangles
                this.setStyle(this.getPositionCentered(), this.getRowCentered(), this.getRadiusCentered());
            } else { //shapes: Rows and NonOverlapping have the real shape radius
                this.setStyle(this.getPositionCentered(), this.getRowCentered(), this.getRadiusRows());
            }

        }
    }

    /**
     * Sets the row style meaning position, row, and radius when the corresponding shape is arranged in a specific row.
     */
    public void setRowsStyle() {
        if (AbstractPainter.ALL_RECTANGLE) {
            this.setStyle(this.getPositionRows(), this.getRowRows(), CartoonPainter.RECTANGLE_HEIGHT);
        } else {
            this.setStyle(this.getPositionRows(), this.getRowRows(), this.getRadiusRows());
        }
    }

    /**
     * Sets the non-overlapping style meaning position, row, and radius when the corresponding shape is
     * arranged is such a way that does not overlap to another one.
     */
    public void setNonOverlappingStyle() {
        if (AbstractPainter.ALL_RECTANGLE) {
            this.setStyle(Position.UP.getPosition(), 0, CartoonPainter.RECTANGLE_HEIGHT);
        } else {
            this.setStyle(Position.UP.getPosition(), 0, this.getRadiusRows());
        }
    }
}
